package groupb6.shopsystem.controller.customer;

import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import groupb6.shopsystem.pojo.entity.Complaint;
import groupb6.shopsystem.pojo.entity.Product;
import groupb6.shopsystem.pojo.form.AddCartForm;
import groupb6.shopsystem.service.CustomerComplaintService;
import groupb6.shopsystem.util.response.UniversalResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Api(tags = "用户投诉页")
@ApiSupport(author = "zyliang")
@RestController
@RequestMapping("/customer/complaint")
public class CustomerComplaintController {

    @Autowired
    CustomerComplaintService customerComplaintService;

    @ApiOperation("添加用户投诉")
    @PostMapping("/addComplaint")
    @ApiResponses(value = {
            @ApiResponse(code = 1000, message = "成功"),
            @ApiResponse(code = 1001, message = "错误"),})
    @ResponseBody
    public UniversalResponse<?> addComplaint(Complaint complaint) {
        return customerComplaintService.addComplaint(complaint);
    }
}
